//
//  View02.m
//  Multiview
//
//  Created by Jeffrey Berthiaume on 4/11/09.
//  Copyright 2009 pushplay.net. All rights reserved.
//

#import "View02.h"
#import "MultiviewAppDelegate.h"

@implementation View02

- (void)goToOne {
	MultiviewAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
	[appDelegate displayView:1];
}

- (void)viewDidLoad {
	NSLog(@"load02");
	
	UIButton *btnTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect]; 
	btnTwo.frame = CGRectMake(40, 40, 240, 30);
	[btnTwo setTitle:@"Two!" forState:UIControlStateNormal];
	[btnTwo addTarget:self action:@selector(goToOne) forControlEvents:UIControlEventTouchUpInside];
	[self.view addSubview:btnTwo];
	
    [super viewDidLoad];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
    // Release anything that's not essential, such as cached data
}


- (void)dealloc {
	NSLog(@"dealloc02");
    [super dealloc];
}


@end
